package com.community.contents.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.community.contents.dto.PostDTO;
import com.community.contents.entity.PostEntity;
import com.community.contents.entity.UserEntity;
import com.community.contents.vo.PostVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 帖子 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2023-02-22
 */
public interface PostMapper extends BaseMapper<PostEntity> {

    public Page<PostDTO> pageDto(Page<PostDTO> params);

    PostVo detail(@Param("id") Integer id);


    Page<PostVo> releaseList(Page<PostVo> p, @Param("userId") Integer userId);


	List<PostEntity> hotPost();
 	Page<UserEntity> userListPage(@Param("topicId") Integer topicId,Page<UserEntity> page);

    Page<PostVo> postListPage(Page<PostVo> page,@Param("topicId") Integer topicId);}

